1. Field of the Invention
The present invention relates generally to a system and method for altering the order in which boot devices are tried during system initialization. More particularly, the present invention relates to a computer system having a boot order that can be adjusted during the initialization of the system if the system is being initialized remotely.
2. Background of the Invention
Due to the advent of power management technology and the more recent "instant-on" efforts, there are many ways in which a computer may exist in the "OFF" state. Examples include hard off (power is disconnected), soft off (power is supplied only to components which monitor activity external to the system), suspend mode (contents of memory are stored on disk and current state of computer is preserved while power consumption is reduced to a minimum level), and sleep mode (the clock signal is reduced or halted to some or all of the system components during periods of inactivity). The sleep and suspend modes may each be invoked at various levels, depending on the particular implementation of these modes, and recovery from these modes is implementation specific.
Turning a computer "ON" from the hard-off or the soft-off state causes the computer to begin an initialization process. In the initialization process, a system reset signal is asserted and released. After the de-assertion of the reset signal, many of the system peripheral components initialize themselves, retrieve configuration information from dedicated EEPROMs, and enter an initialized state. At the same time, the CPU resets itself and searches for instructions on how to prepare the system for operation. The initial instructions are known as the BIOS (basic input/output system) and are typically found by the CPU in a nonvolatile memory such as a ROM (read-only memory). The BIOS is built-in software that contains all the code required to control the keyboard, display screen, disk drives, serial communications, and a number of miscellaneous functions. The BIOS also specifies a boot-up sequence for the CPU to execute to make the computer ready for operation.
Typically, the first thing that the BIOS instructs the CPU to do is to perform what is called the Power-On Self-Test, or POST for short. The POST is a built-in diagnostic program that checks the computer's hardware to ensure that everything is present and functioning properly, before the BIOS begins the actual boot process. Some additional tests are performed later in the boot process. If any fatal errors are encountered, the boot process stops. After the initial POST, the BIOS instructs the CPU to locate the video system's built in BIOS program and to execute it to initialize the video system. The CPU then displays the BIOS's startup screen, and searches for other devices to see if any of them have initialization routines. If any other device initialization routines (e.g. IDE hard drive) are found, they are executed as well. The CPU does more tests on the system, including the memory count-up test which may be viewed on the video display. If an error is encountered at this point, a text error message will generally be displayed on the video display. The BIOS boot-up sequence includes a "system inventory" of sorts, performing more tests to determine what sort of hardware is in the system. Modern BIOSes have many automatic settings and will determine memory timing (for example) based on what kind of memory it finds. Many BIOSes can also dynamically set hard drive parameters and access modes, and will determine these at roughly this time. The BIOS will also now instruct the CPU to search for and label logical devices (COM and LPT ports). If the BIOS supports the Plug and Play standard, the CPU will detect and configure Plug and Play devices at this time and display a message on the screen for each one it finds. The CPU will often display a summary screen about the system configuration and begin a search for a boot device.
Some modern BIOSes contain a boot table that specifies the order of devices from which the system should try to boot. If the first device in the list is present and available, the BIOS will boot the system from that device. If that device is not available, the BIOS will attempt to access the second device in the boot table, and if successful, will boot the system from that device. If the target device that the system tries is not found, the CPU will then try the next device in the boot table, and continue until it finds a bootable device. If no boot device at all can be found, the system will normally display an error message and then freeze up the system.
After having identified a target boot drive, the BIOS instructs the CPU to look for boot information to start the operating system boot process. For example, with a hard disk, the CPU may search for a master boot record at cylinder 0, head 0, sector 1 (the first sector on the disk). If the CPU finds the master boot record, the CPU starts the process of booting the operating system, using the information in the boot sector. At this point, the code in the boot sector takes over from the BIOS code.
The boot devices which may be accessed during the above boot-up sequence include any nonvolatile storage device. Floppy disks, hard disks, magnetic tape, CD-ROMs, Flash ROMs, and network server disks are all examples of devices which can serve as a boot device. To be a boot device, a device should hold a copy of an operating system or application which is to be executed after system initialization. Often the boot device includes a "boot-sector" that informs the CPU of the operating system's exact storage location. Local devices (i.e. devices included in the computer or directly connected to the computer) may in some systems be preferred over remote devices (i.e. devices that need to be accessed via a network or shared communications link) for booting a computer system, while in other systems remote devices may be preferred.
Many variations exist for the boot-up sequence conducted by the BIOS. As computer hardware has become increasingly reliable, proposals have been made to eliminate POST tests altogether from the normal boot-up sequence. For example, in "Simple Boot Flag Specification: Version 1.0", Microsoft has proposed the use of a register to communicate boot options to the system BIOS. The boot flags are PNPOS, BOOTING, and DIAG. The PNPOS flag is asserted if the operating system normally used by the computer is Plug-and-Play capable. If this is the case, the BIOS does not need to spend time configuring components that the operating system will configure. The DIAG flag is de-asserted if hardware tests are considered unnecessary. In this case, the BIOS can skip the POST. The BOOTING flag, if asserted, indicates that the previous boot attempt did not successfully complete and the BIOS may choose to ignore the other flags and provide a complete system test and configuration sequence.
When a computer is in a soft-off state, suspend, or sleep state, it may be configured to awaken if activity is detected, e.g. movement of a mouse or detection of a "wake up" data packet by a network interface card. The source of the triggering activity may come from a local mechanism (i.e. a switch or sensor of any kind such as a power switch, a reset switch, a pressable key, a pressure sensor, a mouse, a joystick, a touch pad, a microphone, or a motion sensor), or the trigger source may be remote. The ability to remotely awaken (from sleep and suspend states) or boot up (from the soft-off state) a computer increases its usability and maintainability. For example, a user can remotely retrieve files even when the computer was turned off, and a system administrator can perform system maintenance without needing to physically visit each computer.
Under certain circumstances, it would be desirable to be able to dynamically reconfigure the order in which devices are targeted for booting the computer. A computer that initially tries to boot from a floppy disk is unable to boot if a non-bootable floppy disk is present in the drive. This would prevent anyone attempting to boot the machine remotely from successfully doing so. In another instance, a system administrator wishing to install a new operating system might prefer to bypass the local drives and boot directly from a network drive. Currently, no systems are known to exist that provide the ability to dynamically reconfigure the boot order when a computer is remotely turned on.